/*
 * @Description: 
 * @Author: 赵大壮
 * @Date: 2022-12-05 11:07:02
 * @LastEditTime: 2022-12-05 12:48:29
 * @LastEditors: 赵大壮
 */
import nyNetwork from "@/api/nyBaseNetwork";
import DZModelPage from "@/model/DZModelPage";
import DZModelStoreUser from "../model/DZModelStoreUser";

class DZServiceStoreUser {


    m_page = new DZModelPage(10);

    list_user: Array<DZModelStoreUser> = [];


    net_list_user() {
        var arr_data = [];
        nyNetwork.net("商城用户列表", this.m_page, data => {
            this.m_page.total = data.total;
            for (const item of data.list) {
                var model = new DZModelStoreUser();
                model.wxId = item.sopenId;
                model.name = item.sname;
                model.header = nyNetwork.image(item.sheaderUrl);
                model.phone = item.sphone;
                arr_data.push(model);
            }
            this.list_user = arr_data;
        })
    }

    net_export_data(isAll) {
        var params = isAll ? this.m_page : {}
        nyNetwork.downFile("导出商城用户", params,"商城用户.xlsx")
    }

}
export default DZServiceStoreUser;